<template>
	<view class="box" :style="{'padding-top':systemHeight+28.5+'px'}">
		<view class="head">
			<image class="back" src="/static/img/back.png" @click="back"></image>
			<view class="title">Complaint</view>
			<view class="right"></view>
		</view>
		<view class="small_title">Opinion Content</view>
		<textarea class="text_area" placeholder="Please describe the content of your co- mplaint"></textarea>
		<view class="small_title">Picture</view>
		<view class="add_img" @click="chooseImge">
			<image class="img_src" :src="ImgSrc"></image>
			<image class="add_img_pho" src="/static/img/add.png"></image>
			<view>Add photo</view>
		</view>
		<view class="small_title">Mobile Number</view>
		<input placeholder="Enter your phone number" class="inpu" />
		<view class="text">Please be patient and we will contact you as soon as we receive your suggestions</view>

		<view class="submit">Submit</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				systemHeight: null,
				ImgSrc:''
			}
		},
		created() {
			this.systemHeight = uni.getSystemInfoSync().statusBarHeight
		},
		methods: {
			back() {
				uni.navigateBack()
			},
			//选则图片
			chooseImge() {
				let that=this
				uni.chooseImage({
					count: 1, //默认9
					success: (res) => {
						let igm = res.tempFilePaths[0];
						that.ImgSrc = igm;
					}
				});
			},
		}
	}
</script>

<style>
	.box {
		position: fixed;
		width: 100%;
		height: 100vh;
	}

	.head {
		margin: 0rpx auto 57rpx;
		width: 92%;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}

	.back {
		width: 20rpx;
		height: 36rpx;
	}

	.title {
		font-family: Mont;
		font-weight: bold;
		font-size: 32rpx;
	}

	.right {
		width: 20rpx;
	}

	.small_title {
		width: 92%;
		margin: 0rpx auto 22rpx;
		font-family: Mont;
		font-weight: 600;
		font-size: 28rpx;
	}

	.text_area {
		margin: 0rpx auto 30rpx;
		box-sizing: border-box;
		width: 92%;
		height: 236rpx;
		background: #F4F4F4;
		border-radius: 30rpx;
		padding: 35rpx;
	}

	.add_img {
		margin: 0rpx 0rpx 38rpx 34rpx;
		position: relative;
		width: 200rpx;
		height: 200rpx;
		background: #F4F4F4;
		border-radius: 30rpx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		font-family: Mont;
		font-weight: 400;
		font-size: 24rpx;
		color: #757575;
	}
	.img_src{
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
	.add_img_pho {
		width: 55rpx;
		height: 54rpx;
		margin-bottom: 30rpx;
	}

	.inpu {
		box-sizing: border-box;
		padding-left: 32rpx;
		margin: 0rpx auto 36rpx;
		width: 92%;
		height: 92rpx;
		background: #F4F4F4;
		border-radius: 30rpx;
	}

	.text {
		width: 92%;
		margin: 0rpx auto;
		height: 68rpx;
		font-family: Mont;
		font-weight: 500;
		font-size: 26rpx;
		color: #040404;
	}

	.submit {
		position: absolute;
		bottom: 190rpx;
		left: 50%;
		transform: translate(-50%, 0);
		width: 690rpx;
		height: 92rpx;
		background: #34BA78;
		border-radius: 46rpx;
		font-family: Mont;
		font-weight: bold;
		font-size: 30rpx;
		color: white;
		line-height: 92rpx;
		text-align: center;
	}
</style>